//
//  HomeViewController.swift
//  DigitalMuseum
//
//  Created by zhongshan on 2024/2/21.
//

import UIKit

class HomeViewController: UIViewController {
    
    private var collectionView: UICollectionView!
    private let masonryLayout: CollectionViewMasonryLayout = CollectionViewMasonryLayout()
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        setupUI()
    }
    
    private func setupUI() {
        masonryLayout.columnCount = 2
        
        collectionView = UICollectionView(frame: .zero, collectionViewLayout: masonryLayout)
        collectionView.delegate = self
        collectionView.dataSource = self
        collectionView.backgroundColor = .white
        view.addSubview(collectionView)
        collectionView.snp.makeConstraints { make in
            make.edges.equalToSuperview()
        }
    }

}

// MARK: - UICollectionViewDataSource
extension HomeViewController: UICollectionViewDataSource {
    
}

// MARK: - CollectionViewMasonryLayoutDelegate
extension HomeViewController: CollectionViewMasonryLayoutDelegate {
    
    func collectionViewMasonryLayout(_ collectionView: UICollectionView, layout: CollectionViewMasonryLayout, heightForItemAtIndexPath indexPath: IndexPath) -> CGFloat {
        
    }
    
}

